package kr.hkit.androidcomplete02.ch16;

import kr.hkit.androidcomplete02.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.os.Bundle;
import android.view.View;

public class TouchOutside extends Activity {
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch16_dialogex);
	}

	public void mOnClick(View v) {
		AlertDialog dialog = new AlertDialog.Builder(this).setTitle("알림")
				.setMessage("대화상자 바깥을 누르면 닫힙니다.")
				.setIcon(R.drawable.ic_launcher)
				.create();

		dialog.setCanceledOnTouchOutside(true);
		dialog.show();
	}
}
